const fs = require('fs');
const path = require('path');

fs.readdir(path.join(__dirname, '..'), (err, files) => {
    if (err) {
        console.log('readdir error, ', err);
        return;
    }

    files.forEach((filename, index) => {
        fs.readFile(
            path.join(__dirname, '..', filename),
            'utf8',
            (err, file) => {
                if (err) {
                    console.log('err:', err);
                    return;
                }
                console.log(file);
            }
        );
    });
});
